<!DOCTYPE HTML>
<html>
<head>
<title>Help : Academic Advisor</title>
<!--script src="lib/jquery/jquery-1.3.2.js"--><!--/script-->
<!--script src="http://code.google.com/apis/gears/gears_init.js"--><!--/script-->
<!--script src="js/mainPage.js"--> <!--/script-->
</head>
<!--------------------------------------------------------Design part of the code---------------------------------------------->
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="#000066">

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000066">
  <tr>
  <td><img src="../images/jsu_banner.jpg"></td>
  </tr>
</table>

<table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">
  <tr>
  <center><td width="100%"><font color="#FFFFFF" face="Arial" size="2"><b>D.O.R.S. Jackson State University Edition</b></font></td></center>
  </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" bgcolor="#000066" valign="top">&nbsp;


<!------------------------------------------End of Design-------------------------------------------------------->


<center>
<img src="../images/logo.jpg">
</center>

<center>
<form name="chooseAdvisor" method="post" action="advisorpage3.php">
<?php
	$host="localhost"; // Host name
	$username="root"; // Mysql username
	$password=""; // Mysql password
	$db_name="JSU_Database"; // Database name

	// Connect to server and select database.
	mysql_connect($host, $username, $password)or die("cannot connect");
	mysql_select_db($db_name)or die("cannot select DB: ".mysql_error());
	
	$selectedDept = $_REQUEST['selectedDept'];
	$result = mysql_query("select Fname, Mname, Lname, JNo from academic_advisor WHERE Department = '$selectedDept'");
	while ($row = mysql_fetch_array($result))
		echo "<br><input name = 'advisors[]' type = 'checkbox' value='$row[3]'><font color='#FFFFFF' face='Arial' size='2'>$row[2], $row[0] $row[1]</font>";
?>
<br><INPUT type="button" value="Back" name="button1" onClick="history.go(-1); return true;">  
<INPUT type="submit" value="Ok" name="button2">
</FORM>
</center>
</html>